package com.wonders.qxmanager.dao.impl;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.wonders.qxmanager.base.BaseDao;
import com.wonders.qxmanager.base.Parameter;
import com.wonders.qxmanager.base.WidgetPage;
import com.wonders.qxmanager.dao.UrlDao;
import com.wonders.qxmanager.model.Url;
import com.wonders.qxmanager.utils.PageArrayList;
@Repository("urlDao")
public class UrlDaoImpl extends BaseDao<Url, Serializable> implements UrlDao {

	List<Url> list;
	@Override
	public void addUrl(Url url) {
		// TODO Auto-generated method stub
		save(url);
	}

	@Override
	public void updateUrl(Url url) {
		// TODO Auto-generated method stub
		update(url);
	}


	@Override
	public PageArrayList<Url> getListByPage(Url url, WidgetPage page) {
		// TODO Auto-generated method stub
		
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Url> getAll() {
		
		String hqlString ="from Url";
		
		return getListByHQL(hqlString,null);
	}

	@Override
	public Url getUrlById(BigDecimal id) {
		// TODO Auto-generated method stub
		return get(id);
	}

	@Override
	public Url getUrlByName(String id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void deleteUrl(int id) {
		// TODO Auto-generated method stub
		deleteById(id);
	}


}
